import request from '@/utils/request'

// 创建工艺路线
export function createProcessRoute(data) {
  return request({
    url: '/mes/process-route/create',
    method: 'post',
    data: data
  })
}

// 更新工艺路线
export function updateProcessRoute(data) {
  return request({
    url: '/mes/process-route/update',
    method: 'put',
    data: data
  })
}

// 删除工艺路线
export function deleteProcessRoute(id) {
  return request({
    url: '/mes/process-route/delete?id=' + id,
    method: 'delete'
  })
}

// 获得工艺路线
export function getProcessRoute(id) {
  return request({
    url: '/mes/process-route/get?id=' + id,
    method: 'get'
  })
}

// 获得工艺路线分页
export function getProcessRoutePage(query) {
  return request({
    url: '/mes/process-route/page',
    method: 'get',
    params: query
  })
}

// 导出工艺路线 Excel
export function exportProcessRouteExcel(query) {
  return request({
    url: '/mes/process-route/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
